package com.aidex.common.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * Tree基类
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseTreeEntity<T> extends BaseEntity {

    @ApiModelProperty("父ID")
    private String parentId;

    @ApiModelProperty("所有父ID")
    private String parentIds;

    @ApiModelProperty("本级排序号")
    private Integer treeSort;

    @ApiModelProperty("本级排序号和所有父级排序号")
    private String treeSorts;

    @ApiModelProperty("树层级")
    private Integer treeLevel;

    @ApiModelProperty("是否叶子节点")
    private String treeLeaf;

    @ApiModelProperty("子部门")
    @TableField(exist = false)
    private List<T> children;
}
